﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace WWLauncher.Constant
{
    public class Constants
    {
        public static string AppDir { get; set; } = AppDomain.CurrentDomain.BaseDirectory;

        // 是否为开发模式
        public static bool DEV { get; set; }

        public static string AppName { get; } = "WWLauncher";
        /// <summary>
        /// 应用程序文件夹
        /// </summary>
        public static string AppExe
        {
            get
            {
                return AppDir + AppName + ".exe";
            }
        }
        /// <summary>
        /// app数据文件路径
        /// </summary>
        public static string DataFilePath
        {
            get
            {
                return AppDir + "data\\Data.info";
            }
        }

        /// <summary>
        /// 密码文件路径
        /// </summary>
        public static string PWFilePath
        {
            get
            {
                return AppDir +  "data\\pw.txt"; 
            }
        }

        /// <summary>
        /// 日志文件
        /// </summary>
        public static string LogFilePath
        {
            get
            {
                return AppDir +  "\\logs\\log.log";
            }
        } 

        /// <summary>
        /// 错误日志
        /// </summary>
        public static string ErrorFilePath
        {
            get
            {
                return AppDir +"\\logs\\error.log";
            }
        }

        /// <summary>
        /// 插件文件夹
        /// </summary>
        public static string PluginsPath
        {
            get
            {
                return AppDir + "\\plugins\\";
            }
        }

        /// <summary>
        /// 阴影宽度
        /// </summary>
        public static int SecondWidth { get; } = 20;

        //系统图标
        public static Dictionary<string, string> SystemIcons = new()
        {
            { "Computer", "此电脑" }, { "GroupPolicy", "组策略" }, { "Network", "网络连接" }, { "RecycleBin", "回收站" },
            { "Registry", "注册表编辑器" }, { "Notepad", "记事本" },
            { "Mstsc", "远程桌面连接" }, { "Control", "控制面板" }, { "CMD", "命令行" }, { "Services", "服务" },
            { "Calculator", "计算器" }
        };


        #region 常量

        //默认磁盘图标
        public static string DefaultDiskImage { get; } = "pack://application:,,,/Resource/Image/磁盘.png";

        //默认文件夹图标
        public static string DefaultDirImage { get; } = "pack://application:,,,/Resource/Image/磁盘.png";

        //默认图片图标
        public static string DefaultImgImage { get; } = "pack://application:,,,/Resource/Image/图片.png";

        /// <summary>
        /// 默认背景图片
        /// </summary>
        public static string DefaultBacImage { get; } = "pack://application:,,,/Resource/Image/DefaultBackground.png";

        //默认菜单图标
        public static string DefaultMenuGeometry =
            "M382.2 165.7H217.4c-47.5 0-86.2 38.7-86.2 86.2v164.8c0 47.5 38.7 86.2 86.2 86.2h164.8c47.5 0 86.2-38.7 86.2-86.2V251.9c0.1-47.6-38.6-86.2-86.2-86.2z m-9.9 241.1h-145v-145h145v145zM382.2 557.6H217.4c-47.5 0-86.2 38.7-86.2 86.2v164.8c0 47.5 38.7 86.2 86.2 86.2h164.8c47.5 0 86.2-38.7 86.2-86.2V643.8c0.1-47.5-38.6-86.2-86.2-86.2z m-9.9 241.1h-145v-145h145v145zM871.6 273.3L755.1 156.8c-16.3-16.3-37.9-25.3-61-25.3-23 0-44.7 9-61 25.3L516.6 273.3c-33.6 33.6-33.6 88.3 0 121.9l116.6 116.5c16.3 16.3 37.9 25.3 61 25.3 23 0 44.7-9 61-25.3l116.6-116.6c33.4-33.4 33.4-88.1-0.2-121.8zM694.1 436.8L591.6 334.3l102.5-102.5 102.5 102.5-102.5 102.5zM776.5 557.6H611.7c-47.5 0-86.2 38.7-86.2 86.2v164.8c0 47.5 38.7 86.2 86.2 86.2h164.8c47.5 0 86.2-38.7 86.2-86.2V643.8c0-47.5-38.7-86.2-86.2-86.2z m-9.9 241.1h-145v-145h145v145z";

        //默认菜单图标颜色
        public static string DefaultMenuGeometryColor { get; } = "Black";

        /// <summary>
        /// 默认url图标
        /// </summary>
        public static string DefaultNetwork { get; } = "pack://application:,,,/Resource/Image/network.png";

        #endregion 常量

        /// <summary>
        /// 生成的图标默认宽度
        /// </summary>
        public static int IconWidth { get; } = 64;


        /// <summary>
        /// 默认菜单栏宽度
        /// </summary>
        public static int MenuCardWidth { get; } = 165;

        /// <summary>
        /// 默认图标宽度
        /// </summary>
        public static int ImageWidth { get; } = 36;

        /// <summary>
        /// 默认图标高度
        /// </summary>
        public static int ImageHeight { get; } = 36;

        /// <summary>
        /// 图标容器宽度
        /// </summary>
        public static int ImagePanelWidth { get; } = 110;

        /// <summary>
        /// 图标容器高度
        /// </summary>
        public static int ImagePanelHeight { get; } = 80;

        /// <summary>
        /// 主窗口动画时间
        /// </summary>
        public static int WindowAnimationTime { get; } = 150;

        static Constants()
        {
#if DEBUG
            DEV = true;
            AppName = "WWLauncher-D";
#endif

        }
    }
}